$OpenBSD: patch-plugins_bladesio1_gui_c,v 1.1 2014/02/06 03:10:48 jeremy Exp $
--- plugins/bladesio1/gui.c.orig	Tue Feb  4 19:27:11 2014
+++ plugins/bladesio1/gui.c	Tue Feb  4 19:29:14 2014
@@ -26,8 +26,6 @@
 #include <gtk/gtk.h>
 
 #include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <linux/if.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <netdb.h>
@@ -42,6 +40,7 @@
 
 #define MAXINTERFACES 16
 
+#if 0
 void sockGetIP(char *IPAddress) {
 	int fd, intrface;
 	struct ifreq buf[MAXINTERFACES];
@@ -66,6 +65,22 @@ void sockGetIP(char *IPAddress) {
 		close(fd);
 	}
 }
+
+#else
+
+void sockGetIP(char *IPAddress) {
+    struct hostent *host;
+    char str[256];
+
+    gethostname(str, 256);
+    host = gethostbyname(str);
+
+    if (host != NULL)
+        strcpy(IPAddress, inet_ntoa(*((struct in_addr *)host->h_addr_list[0])));
+    else strcpy(IPAddress, "127.0.0.1");
+}
+
+#endif
 
 void cfgSysMessage(const char *fmt, ...) {
 	GtkWidget *MsgDlg;
